<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../css/aui.2.0.css" />
</head>

<body>
    <header class="aui-bar aui-bar-nav" style="background-color: #03a9f4;position:fixed;" id="header">
        <a class="aui-pull-left aui-btn" tapmode onclick="closeWin();">
            <span class="aui-iconfont aui-icon-left"></span>
        </a>
        <div class="aui-title" id="title">
            安灯呼叫
        </div>
    </header>
    <div class="aui-content aui-margin-b-15" style="margin-top:50px;">
        <ul class="aui-list aui-form-list">
            <li class="aui-list-item">
                <div class="aui-list-item-inner">
                    <div class="aui-list-item-label" style="font-size: 30px;font-weight: bold;color: rgb(0, 0, 0);">产线
                    </div>
                    <div class="aui-list-item-input" onclick="goSelectLineCode();">
                        <input style="font-size: 30px;font-weight: bold;color: rgb(0, 0, 0);" type="text" disabled
                            placeholder="选择产线" class="aui-input" id="lineName">
                    </div>
                    <i class="aui-input-addon aui-iconfont aui-icon-right" onclick="goSelectLineCode()"></i>
                </div>
            </li>
        </ul>
        </br>
        </br>
        <div class="aui-btn aui-btn-block"
            style="background-color: #00BFBF;width:80%;margin-left:10%;font-size: 30px;font-weight: bold;color: white;"
            onclick="goPage('1')">安灯发起</div>
        </br>
        <div class="aui-btn aui-btn-block"
            style="background-color: #F59A23;width:80%;margin-left:10%;font-size: 30px;font-weight: bold;color: white;"
            onclick="goPage('2')">安灯响应</div>
        </br>
        <div class="aui-btn aui-btn-block"
            style="width:80%;margin-left:10%;font-size: 30px;font-weight: bold;background-color: #528302;color: white;"
            onclick="goPage('3')">安灯处理</div>
        </br>
        <div class="aui-btn aui-btn-block"
            style="background-color: #D9001B;width:80%;margin-left:10%;font-size: 30px;font-weight: bold;color: white;"
            onclick="goPage('4')">安灯关闭</div>
        </br>
        <div class="aui-btn aui-btn-block"
            style="background-color: #43207a;width:80%;margin-left:10%;font-size: 30px;font-weight: bold;color: white;"
            onclick="goPage('5')">安灯历史</div>
        </br>
    </div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="../script/public.js"></script>
<script type="text/javascript">
    var lineCode = "";
    //初始化获取参数
    apiready = function () {


    }

    //跳转页面
    function goPage(flag) {
        if (flag == "1") {

            name = "andon_launch";

        } else if (flag == "2") {

            name = "andon_response";

        } else if (flag == "3") {

            name = "andon_deal";

        }
        else if (flag == "4") {

            name = "andon_close";

        } else if (flag == "5") {

            name = "andon_history";

        }
        //除了安灯历史
        if (flag != "5") {
            if (lineCode == null || lineCode == "" || lineCode == undefined) {
                api.toast({
                    msg: '产线不能为空！',
                    duration: 3000
                });
                return;
            }
        }
        var lineName = $("#lineName").val();
        //打开页面
        api.openWin({
            name: name,
            url: name + '.html',
            pageParam: {
                lineCode: lineCode,
                lineName: lineName,
            }
        });
    }

    function goSelectLineCode() {
        api.openWin({
            name: 'usmSelectLine',
            url: 'usmSelectLine.html',
            pageParam: {
                name: "andon_call",
            }
        });
    }

    function setLineCode(sysid, code, name) {
        $("#lineName").val(name);
        lineCode = code
    }

    //订单返回按钮
    function closeWin() {
        api.closeWin({});
    }
</script>

</html>